function uploadfile(cid) {
    var formData = new FormData();
    var id ='input.'+cid;
    var tfile =$(id);
    console.log($(id).length);
    var url ='/file/upload';
    var count =0;
    tfile.each(
        function () {
            if ($(this).val() != ""){
                count++;
            }
        }
    );
    console.log(count);
    if (count>1){
        url ='/file/uploads';
    }
    for (var i=0;i<tfile.length;i++){
        formData.append('file',tfile[i].files[0]);
    }
    $.ajax({
        url: url,
        type: 'POST',
        cache: false,
        data: formData,
        processData: false,
        contentType: false
    }).done(function(res) {
        tfile.each(function () {
            $(this).val("");
            console.log("文件清空完成");
        });
        console.log(res)
    }).fail(function(res) {
        console.log(res)
    });
}